{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Dynamic Process: Robustness to the Belief Updating Parameter (C.2)" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "ExecuteTime": { "end_time": "2021-02-09T13:45:37.416421Z", "start_time": "2021-02-09T13:45:30.509634Z" } }, "outputs": [], "source": [ "import numpy as np\n", "import pandas as pd\n", "from matplotlib import pyplot as plt\n", "from poisson_approval import *" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "ExecuteTime": { "end_time": "2021-02-09T13:45:37.424400Z", "start_time": "2021-02-09T13:45:37.419414Z" } }, "outputs": [], "source": [ "N_SAMPLES = 10000\n", "N_MAX_EPISODES = 1000" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "ExecuteTime": { "end_time": "2021-02-09T13:45:37.462835Z", "start_time": "2021-02-09T13:45:37.428390Z" } }, "outputs": [], "source": [ "update_ratios = {\n", " '1': 1,\n", " '0.5': 0.5,\n", " 'one_over_log_log_t_plus_fourteen': one_over_log_log_t_plus_fourteen,\n", " 'one_over_log_t_plus_one': one_over_log_t_plus_one,\n", " 'one_over_sqrt_t': one_over_sqrt_t,\n", " 'one_over_t': one_over_t, \n", "}" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "ExecuteTime": { "end_time": "2021-02-09T13:45:37.473806Z", "start_time": "2021-02-09T13:45:37.465827Z" } }, "outputs": [], "source": [ "update_ratios_legend = {\n", " '1': '1', \n", " '0.5': '0.5',\n", " 'one_over_log_log_t_plus_fourteen': '1 / log(log(t + 14))',\n", " 'one_over_log_t_plus_one': '1 / log(t + 1)',\n", " 'one_over_sqrt_t': '1 / sqrt(t)',\n", " 'one_over_t': '1 / t', \n", "}" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "ExecuteTime": { "end_time": "2021-02-09T13:45:37.485166Z", "start_time": "2021-02-09T13:45:37.476797Z" } }, "outputs": [], "source": [ "rand_profile = RandProfileHistogramUniform(n_bins=1)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Convergence Rate" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "ExecuteTime": { "end_time": "2021-02-09T13:45:42.229898Z", "start_time": "2021-02-09T13:45:37.488152Z" } }, "outputs": [ { "data": { "text/html": [ "
\n", " | Approval | \n", "Plurality | \n", "Anti-plurality | \n", "
---|---|---|---|
Belief updating parameter | \n", "\n", " | \n", " | \n", " |
1 | \n", "0.9387 | \n", "1.0 | \n", "0.0 | \n", "
0.5 | \n", "0.9503 | \n", "1.0 | \n", "0.0 | \n", "
one_over_log_log_t_plus_fourteen | \n", "0.9483 | \n", "1.0 | \n", "0.0 | \n", "
one_over_log_t_plus_one | \n", "0.9497 | \n", "1.0 | \n", "0.0 | \n", "
one_over_sqrt_t | \n", "0.9468 | \n", "1.0 | \n", "0.0 | \n", "
one_over_t | \n", "0.0000 | \n", "0.0 | \n", "0.0 | \n", "